package com.example.b_308.myapplication.model.base;

import com.example.b_308.myapplication.model.base.BaseModel;

import java.io.Serializable;

/**
 * Created by B-308 on 2017/11/20.
 */
public class BaseDepartment extends BaseModel {

    String id;
    String company_id;
    String name;
    String Create_time;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BaseDepartment that = (BaseDepartment) o;
        return name != null ? name.equals(that.name) : that.name == null;
    }

    @Override
    public int hashCode() {
        return name != null ? name.hashCode() : 0;
    }

    public BaseDepartment() {
    }

    public BaseDepartment(String json) {
        super(json);
    }

    public String getId() {
        if (null == id)
            id = getStr("id");
        return id;
    }

    public String getCompany_id() {
        if (null == company_id)
            company_id = getStr("company_id");
        return company_id;
    }

    public String getName() {
        if (null == name)
            name = getStr("name");
        return name;
    }

    public String getCreate_time() {
        if (null == Create_time)
            Create_time = getStr("Create_time");
        return Create_time;
    }


    public void setId(String id) {
        put("id", id);
        this.id = id;
    }

    public void setCompany_id(String company_id) {
        put("company_id", company_id);
        this.company_id = company_id;
    }

    public void setName(String name) {
        put("name", name);
        this.name = name;
    }

    public void setCreate_time(String create_time) {
        put("Create_time", Create_time);
        this.Create_time = create_time;
    }


}
